Introduction

The shapes should affect on the eigen vectors.

We expect that the symmetricity should strongly affect on the appearance of eigen vectors along with their corresponding eigen values.

Plans

Strategies

Utility functions

my.col.st <- function(x,N=5){
  floor((x-min(x))/(max(x)-min(x)) * 0.99 * N)+1
}

my.color.point <- function(X,col,cex=0.5){
  n <- length(unique(col))
  ucol <- unique(col)
  for(i in 1:n){
    tmp <- which(col==ucol[i])
    points(X[tmp,],pch=20,col=ucol[i],cex=cex)
  }
}

Lattice in the shape of regtangle

my.rect.lattice <- function(xy){
  X <- 0:xy[1]
  Y <- 0:xy[2]
  XY <- as.matrix(expand.grid(X,Y))
  n <- length(XY[,1])
  d <- as.matrix(dist(XY,method="manhattan"))
  adj <- matrix(0,length(d[1,]),length(d[,1]))
  adj[which(d==1)] <- 1
  return(list(X=XY,n=n,adj=adj))
}
xy <- c(50,50)
out <- my.rect.lattice(xy)
plot(out$X,pch=20,cex=0.001)

Connect two squares for example with only one shared vertex

X2 <- rbind(out$X,out$X + 50)
plot(X2)

adj <- matrix(0,out$n*2-1,out$n*2-1)
adj[1:out$n,1:out$n] <- out$adj
adj[out$n:(2*out$n-1),out$n:(2*out$n-1)] <- out$adj
eigen.out <-eigen(adj)
p <- 1 
col <- my.col.st(eigen.out[[2]][,1],N=5)
plot(X2,pch=20,cex=0.0001)
my.color.point(X2,col,cex=0.1)

Plot series of eigen vectors

for(i in 1:20){
  col <- my.col.st(eigen.out[[2]][,i],N=5)
  plot(X2,pch=20,cex=0.0001,main=paste(i, "-st"))
  my.color.point(X2,col,cex=0.1)
}